//
//  XQReadCell.m
//  Miss
//
//  Created by 军哥 on 15-1-28.
//  Copyright (c) 2015年 Alan. All rights reserved.
//

#import "XQReadCell.h"

@interface XQReadCell()
- (void)setXQReadCell;
@end

@implementation XQReadCell
- (void)dealloc
{
    [_mylabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setXQReadCell];
    }
    return self;
}
- (void)setXQReadCell
{
    self.mylabel = [[UILabel alloc]init];
    self.mylabel.backgroundColor = [UIColor cyanColor];
    self.mylabel.numberOfLines = 0;
    [self.contentView addSubview:_mylabel];
    [_mylabel release];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:17]};
    CGRect rect = [self.mylabel.text boundingRectWithSize:CGSizeMake(self.contentView.frame.size.width, 1000) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    _mylabel.frame = CGRectMake(0, 0, self.contentView.frame.size.width, rect.size.height);
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
